\(\int \frac {(a+b \arctan (c x)) (d+e \log (1+c^2 x^2))}{x} \, dx\) [1291]

   Optimal result
   Rubi [A] (verified)
   Mathematica [F]
   Maple [C] (warning: unable to verify)
   Fricas [F]
   Sympy [F]
   Maxima [F]
   Giac [F(-1)]
   Mupad [F(-1)]

Optimal result

Integrand size = 26, antiderivative size = 282 \[ \int \frac {(a+b \arctan (c x)) \left (d+e \log \left (1+c^2 x^2\right )\right )}{x} \, dx=a d \log (x)+\frac {1}{2} i b e \log (i c x) \log ^2(1-i c x)-\frac {1}{2} i b e \log (-i c x) \log ^2(1+i c x)+\frac {1}{2} i b d \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i b e \left (\log (1-i c x)+\log (1+i c x)-\log \left (1+c^2 x^2\right )\right ) \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i b d \operatorname {PolyLog}(2,i c x)+\frac {1}{2} i b e \left (\log (1-i c x)+\log (1+i c x)-\log \left (1+c^2 x^2\right )\right ) \operatorname {PolyLog}(2,i c x)-\frac {1}{2} a e \operatorname {PolyLog}\left (2,-c^2 x^2\right )+i b e \log (1-i c x) \operatorname {PolyLog}(2,1-i c x)-i b e \log (1+i c x) \operatorname {PolyLog}(2,1+i c x)-i b e \operatorname {PolyLog}(3,1-i c x)+i b e \operatorname {PolyLog}(3,1+i c x) \]

[Out]

a*d*ln(x)+1/2*I*b*e*ln(I*c*x)*ln(1-I*c*x)^2-1/2*I*b*e*ln(-I*c*x)*ln(1+I*c*x)^2+1/2*I*b*d*polylog(2,-I*c*x)-1/2
*I*b*e*(ln(1-I*c*x)+ln(1+I*c*x)-ln(c^2*x^2+1))*polylog(2,-I*c*x)-1/2*I*b*d*polylog(2,I*c*x)+1/2*I*b*e*(ln(1-I*
c*x)+ln(1+I*c*x)-ln(c^2*x^2+1))*polylog(2,I*c*x)-1/2*a*e*polylog(2,-c^2*x^2)+I*b*e*ln(1-I*c*x)*polylog(2,1-I*c
*x)-I*b*e*ln(1+I*c*x)*polylog(2,1+I*c*x)-I*b*e*polylog(3,1-I*c*x)+I*b*e*polylog(3,1+I*c*x)

Rubi [A] (verified)

Time = 0.23 (sec) , antiderivative size = 282, normalized size of antiderivative = 1.00, number of steps used = 18, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.346, Rules used = {5135, 4940, 2438, 5133, 5131, 2443, 2481, 2421, 6724} \[ \int \frac {(a+b \arctan (c x)) \left (d+e \log \left (1+c^2 x^2\right )\right )}{x} \, dx=-\frac {1}{2} a e \operatorname {PolyLog}\left (2,-c^2 x^2\right )+a d \log (x)-\frac {1}{2} i b e \operatorname {PolyLog}(2,-i c x) \left (-\log \left (c^2 x^2+1\right )+\log (1-i c x)+\log (1+i c x)\right )+\frac {1}{2} i b e \operatorname {PolyLog}(2,i c x) \left (-\log \left (c^2 x^2+1\right )+\log (1-i c x)+\log (1+i c x)\right )+\frac {1}{2} i b d \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i b d \operatorname {PolyLog}(2,i c x)-i b e \operatorname {PolyLog}(3,1-i c x)+i b e \operatorname {PolyLog}(3,i c x+1)+i b e \operatorname {PolyLog}(2,1-i c x) \log (1-i c x)-i b e \operatorname {PolyLog}(2,i c x+1) \log (1+i c x)+\frac {1}{2} i b e \log (i c x) \log ^2(1-i c x)-\frac {1}{2} i b e \log (-i c x) \log ^2(1+i c x) \]

[In]

Int[((a + b*ArcTan[c*x])*(d + e*Log[1 + c^2*x^2]))/x,x]

[Out]

a*d*Log[x] + (I/2)*b*e*Log[I*c*x]*Log[1 - I*c*x]^2 - (I/2)*b*e*Log[(-I)*c*x]*Log[1 + I*c*x]^2 + (I/2)*b*d*Poly
Log[2, (-I)*c*x] - (I/2)*b*e*(Log[1 - I*c*x] + Log[1 + I*c*x] - Log[1 + c^2*x^2])*PolyLog[2, (-I)*c*x] - (I/2)
*b*d*PolyLog[2, I*c*x] + (I/2)*b*e*(Log[1 - I*c*x] + Log[1 + I*c*x] - Log[1 + c^2*x^2])*PolyLog[2, I*c*x] - (a
*e*PolyLog[2, -(c^2*x^2)])/2 + I*b*e*Log[1 - I*c*x]*PolyLog[2, 1 - I*c*x] - I*b*e*Log[1 + I*c*x]*PolyLog[2, 1
+ I*c*x] - I*b*e*PolyLog[3, 1 - I*c*x] + I*b*e*PolyLog[3, 1 + I*c*x]

Rule 2421

Int[(Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.))/(x_), x_Symbol] :> Simp
[(-PolyLog[2, (-d)*f*x^m])*((a + b*Log[c*x^n])^p/m), x] + Dist[b*n*(p/m), Int[PolyLog[2, (-d)*f*x^m]*((a + b*L
og[c*x^n])^(p - 1)/x), x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[p, 0] && EqQ[d*e, 1]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2443

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_)/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[Log[e*((
f + g*x)/(e*f - d*g))]*((a + b*Log[c*(d + e*x)^n])^p/g), x] - Dist[b*e*n*(p/g), Int[Log[(e*(f + g*x))/(e*f - d
*g)]*((a + b*Log[c*(d + e*x)^n])^(p - 1)/(d + e*x)), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && NeQ[e*
f - d*g, 0] && IGtQ[p, 1]

Rule 2481

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + Log[(h_.)*((i_.) + (j_.)*(x_))^(m_.)]*
(g_.))*((k_.) + (l_.)*(x_))^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[(k*(x/d))^r*(a + b*Log[c*x^n])^p*(f + g*Lo
g[h*((e*i - d*j)/e + j*(x/e))^m]), x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, j, k, l, n, p, r},
 x] && EqQ[e*k - d*l, 0]

Rule 4940

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/(x_), x_Symbol] :> Simp[a*Log[x], x] + (Dist[I*(b/2), Int[Log[1 - I*c*x
]/x, x], x] - Dist[I*(b/2), Int[Log[1 + I*c*x]/x, x], x]) /; FreeQ[{a, b, c}, x]

Rule 5131

Int[(ArcTan[(c_.)*(x_)]*Log[(f_.) + (g_.)*(x_)^2])/(x_), x_Symbol] :> Dist[Log[f + g*x^2] - Log[1 - I*c*x] - L
og[1 + I*c*x], Int[ArcTan[c*x]/x, x], x] + (Dist[I/2, Int[Log[1 - I*c*x]^2/x, x], x] - Dist[I/2, Int[Log[1 + I
*c*x]^2/x, x], x]) /; FreeQ[{c, f, g}, x] && EqQ[g, c^2*f]

Rule 5133

Int[(Log[(f_.) + (g_.)*(x_)^2]*(ArcTan[(c_.)*(x_)]*(b_.) + (a_)))/(x_), x_Symbol] :> Dist[a, Int[Log[f + g*x^2
]/x, x], x] + Dist[b, Int[Log[f + g*x^2]*(ArcTan[c*x]/x), x], x] /; FreeQ[{a, b, c, f, g}, x]

Rule 5135

Int[(((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*(Log[(f_.) + (g_.)*(x_)^2]*(e_.) + (d_)))/(x_), x_Symbol] :> Dist[d, I
nt[(a + b*ArcTan[c*x])/x, x], x] + Dist[e, Int[Log[f + g*x^2]*((a + b*ArcTan[c*x])/x), x], x] /; FreeQ[{a, b,
c, d, e, f, g}, x]

Rule 6724

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rubi steps \begin{align*} \text {integral}& = d \int \frac {a+b \arctan (c x)}{x} \, dx+e \int \frac {(a+b \arctan (c x)) \log \left (1+c^2 x^2\right )}{x} \, dx \\ & = a d \log (x)+\frac {1}{2} (i b d) \int \frac {\log (1-i c x)}{x} \, dx-\frac {1}{2} (i b d) \int \frac {\log (1+i c x)}{x} \, dx+(a e) \int \frac {\log \left (1+c^2 x^2\right )}{x} \, dx+(b e) \int \frac {\arctan (c x) \log \left (1+c^2 x^2\right )}{x} \, dx \\ & = a d \log (x)+\frac {1}{2} i b d \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i b d \operatorname {PolyLog}(2,i c x)-\frac {1}{2} a e \operatorname {PolyLog}\left (2,-c^2 x^2\right )+\frac {1}{2} (i b e) \int \frac {\log ^2(1-i c x)}{x} \, dx-\frac {1}{2} (i b e) \int \frac {\log ^2(1+i c x)}{x} \, dx+\left (b e \left (-\log (1-i c x)-\log (1+i c x)+\log \left (1+c^2 x^2\right )\right )\right ) \int \frac {\arctan (c x)}{x} \, dx \\ & = a d \log (x)+\frac {1}{2} i b e \log (i c x) \log ^2(1-i c x)-\frac {1}{2} i b e \log (-i c x) \log ^2(1+i c x)+\frac {1}{2} i b d \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i b d \operatorname {PolyLog}(2,i c x)-\frac {1}{2} a e \operatorname {PolyLog}\left (2,-c^2 x^2\right )-(b c e) \int \frac {\log (i c x) \log (1-i c x)}{1-i c x} \, dx-(b c e) \int \frac {\log (-i c x) \log (1+i c x)}{1+i c x} \, dx+\frac {1}{2} \left (i b e \left (-\log (1-i c x)-\log (1+i c x)+\log \left (1+c^2 x^2\right )\right )\right ) \int \frac {\log (1-i c x)}{x} \, dx-\frac {1}{2} \left (i b e \left (-\log (1-i c x)-\log (1+i c x)+\log \left (1+c^2 x^2\right )\right )\right ) \int \frac {\log (1+i c x)}{x} \, dx \\ & = a d \log (x)+\frac {1}{2} i b e \log (i c x) \log ^2(1-i c x)-\frac {1}{2} i b e \log (-i c x) \log ^2(1+i c x)+\frac {1}{2} i b d \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i b e \left (\log (1-i c x)+\log (1+i c x)-\log \left (1+c^2 x^2\right )\right ) \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i b d \operatorname {PolyLog}(2,i c x)+\frac {1}{2} i b e \left (\log (1-i c x)+\log (1+i c x)-\log \left (1+c^2 x^2\right )\right ) \operatorname {PolyLog}(2,i c x)-\frac {1}{2} a e \operatorname {PolyLog}\left (2,-c^2 x^2\right )+(i b e) \text {Subst}\left (\int \frac {\log (x) \log \left (-i c \left (\frac {i}{c}-\frac {i x}{c}\right )\right )}{x} \, dx,x,1+i c x\right )-(i b e) \text {Subst}\left (\int \frac {\log (x) \log \left (i c \left (-\frac {i}{c}+\frac {i x}{c}\right )\right )}{x} \, dx,x,1-i c x\right ) \\ & = a d \log (x)+\frac {1}{2} i b e \log (i c x) \log ^2(1-i c x)-\frac {1}{2} i b e \log (-i c x) \log ^2(1+i c x)+\frac {1}{2} i b d \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i b e \left (\log (1-i c x)+\log (1+i c x)-\log \left (1+c^2 x^2\right )\right ) \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i b d \operatorname {PolyLog}(2,i c x)+\frac {1}{2} i b e \left (\log (1-i c x)+\log (1+i c x)-\log \left (1+c^2 x^2\right )\right ) \operatorname {PolyLog}(2,i c x)-\frac {1}{2} a e \operatorname {PolyLog}\left (2,-c^2 x^2\right )+i b e \log (1-i c x) \operatorname {PolyLog}(2,1-i c x)-i b e \log (1+i c x) \operatorname {PolyLog}(2,1+i c x)-(i b e) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(2,x)}{x} \, dx,x,1-i c x\right )+(i b e) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(2,x)}{x} \, dx,x,1+i c x\right ) \\ & = a d \log (x)+\frac {1}{2} i b e \log (i c x) \log ^2(1-i c x)-\frac {1}{2} i b e \log (-i c x) \log ^2(1+i c x)+\frac {1}{2} i b d \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i b e \left (\log (1-i c x)+\log (1+i c x)-\log \left (1+c^2 x^2\right )\right ) \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i b d \operatorname {PolyLog}(2,i c x)+\frac {1}{2} i b e \left (\log (1-i c x)+\log (1+i c x)-\log \left (1+c^2 x^2\right )\right ) \operatorname {PolyLog}(2,i c x)-\frac {1}{2} a e \operatorname {PolyLog}\left (2,-c^2 x^2\right )+i b e \log (1-i c x) \operatorname {PolyLog}(2,1-i c x)-i b e \log (1+i c x) \operatorname {PolyLog}(2,1+i c x)-i b e \operatorname {PolyLog}(3,1-i c x)+i b e \operatorname {PolyLog}(3,1+i c x) \\ \end{align*}

Mathematica [F]

\[ \int \frac {(a+b \arctan (c x)) \left (d+e \log \left (1+c^2 x^2\right )\right )}{x} \, dx=\int \frac {(a+b \arctan (c x)) \left (d+e \log \left (1+c^2 x^2\right )\right )}{x} \, dx \]

[In]

Integrate[((a + b*ArcTan[c*x])*(d + e*Log[1 + c^2*x^2]))/x,x]

[Out]

Integrate[((a + b*ArcTan[c*x])*(d + e*Log[1 + c^2*x^2]))/x, x]

Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 10.84 (sec) , antiderivative size = 5420, normalized size of antiderivative = 19.22

method result size
risch \(\text {Expression too large to display}\) \(5420\)

[In]

int((a+b*arctan(c*x))*(d+e*ln(c^2*x^2+1))/x,x,method=_RETURNVERBOSE)

[Out]

result too large to display

Fricas [F]

\[ \int \frac {(a+b \arctan (c x)) \left (d+e \log \left (1+c^2 x^2\right )\right )}{x} \, dx=\int { \frac {{\left (b \arctan \left (c x\right ) + a\right )} {\left (e \log \left (c^{2} x^{2} + 1\right ) + d\right )}}{x} \,d x } \]

[In]

integrate((a+b*arctan(c*x))*(d+e*log(c^2*x^2+1))/x,x, algorithm="fricas")

[Out]

integral((b*d*arctan(c*x) + a*d + (b*e*arctan(c*x) + a*e)*log(c^2*x^2 + 1))/x, x)

Sympy [F]

\[ \int \frac {(a+b \arctan (c x)) \left (d+e \log \left (1+c^2 x^2\right )\right )}{x} \, dx=\int \frac {\left (a + b \operatorname {atan}{\left (c x \right )}\right ) \left (d + e \log {\left (c^{2} x^{2} + 1 \right )}\right )}{x}\, dx \]

[In]

integrate((a+b*atan(c*x))*(d+e*ln(c**2*x**2+1))/x,x)

[Out]

Integral((a + b*atan(c*x))*(d + e*log(c**2*x**2 + 1))/x, x)

Maxima [F]

\[ \int \frac {(a+b \arctan (c x)) \left (d+e \log \left (1+c^2 x^2\right )\right )}{x} \, dx=\int { \frac {{\left (b \arctan \left (c x\right ) + a\right )} {\left (e \log \left (c^{2} x^{2} + 1\right ) + d\right )}}{x} \,d x } \]

[In]

integrate((a+b*arctan(c*x))*(d+e*log(c^2*x^2+1))/x,x, algorithm="maxima")

[Out]

a*d*log(x) + 1/2*integrate(2*(b*d*arctan(c*x) + (b*e*arctan(c*x) + a*e)*log(c^2*x^2 + 1))/x, x)

Giac [F(-1)]

Timed out. \[ \int \frac {(a+b \arctan (c x)) \left (d+e \log \left (1+c^2 x^2\right )\right )}{x} \, dx=\text {Timed out} \]

[In]

integrate((a+b*arctan(c*x))*(d+e*log(c^2*x^2+1))/x,x, algorithm="giac")

[Out]

Timed out

Mupad [F(-1)]

Timed out. \[ \int \frac {(a+b \arctan (c x)) \left (d+e \log \left (1+c^2 x^2\right )\right )}{x} \, dx=\int \frac {\left (a+b\,\mathrm {atan}\left (c\,x\right )\right )\,\left (d+e\,\ln \left (c^2\,x^2+1\right )\right )}{x} \,d x \]

[In]

int(((a + b*atan(c*x))*(d + e*log(c^2*x^2 + 1)))/x,x)

[Out]

int(((a + b*atan(c*x))*(d + e*log(c^2*x^2 + 1)))/x, x)